from django.conf.urls.defaults import *
from django.contrib.comments.models import FreeComment
from django.conf import settings


comments_info_dict = {
    'queryset': FreeComment.objects.all(),
    'paginate_by': 1,
}


urlpatterns = patterns('',
    
    
    #Las FlatPages
    (r'^/$', include('django.contrib.flatpages.urls')),
    #La administracion
    (r'^admin/', include('django.contrib.admin.urls')),
    #La aplicacion blog
    (r'^blog/' , include('lugtrelew.blog.urls')),
    #Los comentaros
    (r'^comments/$', 'django.views.generic.list_detail.object_list', comments_info_dict),
    
    (r'^comments/', include('django.contrib.comments.urls.comments')),
)


if settings.DEBUG:
    urlpatterns += patterns('',
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'media', 'show_indexes': True}),
)
